CLImax is an AppleScript client designed to bring a kind of command-line interface to the Macintosh. It uses a TSM (read: メmagic floatingモ) window as an interface, which is always the foremost window no matter which application you might be in. A flip of a hotkey toggles the window's visibility, so you can execute quick AppleScript commands from anywhere!
No extra extensions or control panels are required; CLImax is entirely application-based. There are no system patches, and no need to restart to install it! And since CLImax doesn't care whether it's a normal application or not, you can run it as an invisible background-only (daemon) process and still get the interface.
The window
ハ
The left half of the window contains the script, and after execution, the right half will contain the result. The active scripting system (typically メAppleScript Englishモ) is identified just above the script field. In the top right, the default target application and the front process are displayed.
Clicking on the balloon icon brings up a pop-up menu to select the target process ム like an AppleScript メtellモ statement ム and clicking on the icon that looks like a pair of windows brings up a similar pop-up to switch between apps. Clicking on the names next to the icons advances forward through the list. You can drag the divider to change the sizes of the script and result fields.
The default hotkey to hide and show the window is command-`. (The ` character is a backtick, which is probably in the upper-left corner of your keyboard.) This can be configured from the preferences box.
Running Scripts
To execute a script command, just type it in and hit return. When it finishes, the result will be displayed in the right half of the window. If you need to enter a more complex script that uses multiple lines, command-return forces a carriage return without executing, as does the enter key.
Spinning arrows will appear in the window, next to the scripting system name, while the script is running. When itユs done, the result will appear in the right-hand side of the window.
At any time while a script is executing, you can press command-period (□-.) to cancel. You may need to hold it down until an event gets through.
Setting the default target
Command-tab sets the default [AppleScript] target to the next application in the list, and command-shift-tab sets it to the previous application in the list. (This does the equivalent of an AppleScript メtellモ, without the hassle... thatユs what the balloon icon is supposed to suggest.)
Control-tab switches the target to whichever application is frontmost.
Option-tab toggles between talking to the Finder and to CLImax.
Command History
Option-up and option-down activate the command history. The default size is 12 commands, but this is configurable up to 50. The history can be persistent across launches; look in the preferences box.
Miscellaneous hidden features
All the standard editing commands are available, including undo, copy, paste, select all, page up, page down, and so on. CLImax is also drag-happy and hopefully inline-input-aware. (Thanks, Marco!)
When dragging text into the window, hold down the command key (□) to replace the entire contents of the field rather than inserting.
If CLImax is set to run as an invisible background app, hold down the control key when you double-click it to force it to launch as a normal foreground app. (Just in case you've forgotten your hotkey. :-)
CLImax will not let you run more than one copy of itself at once ム and there are lots of good reasons for this ム but if you need to override this feature, hold down the command key (□) while launching the second copy.
Scripting dictionary
CLImax's scripting dictionary is not well-fleshed out at this point in development, and object-based scripting won't be available until the next version, but here are the commands it understands so far:
dictionary for anything
The parameter for this command can be either an alias, file specification, or string. If it's a string, CLImax
checks for the following in order: full name of running process, four-char signature of running process,
four-char signature of some application on local disks, partial name of running process. If a valid match
is found, CLImax launches your script editor and tells it to open the application's scripting dictionary.
editor
Launches the script editor configured in the preferences box, for when CLImax just isn't powerful enough.
do script string
Executes a script using CLImax's context and active scripting system. Possibly useful if you need to
put together a script on the fly.
hide window
show window
These are pretty obvious. :-)
preferences
CLImax will activate and bring up its preferences box. If executed while running as a daemon, it will
temporarily relaunch as a foreground app, display the dialog, and return to its normal state afterwards.
about box
Just like choosing メAbout CLImaxノモ from the Apple menu when it's a foreground app.
relaunch [as daemon/foreground app]
CLImax will quit and relaunch itself. If you specify メas daemonモ, CLImax turns into a faceless background
app (FBA) but still retains nearly all of its capabilities. If you specify メas foreground appモ, CLImax
launches as a normal application. (Well, almost normal, except its window still floats on top.)
info for anything
dump anything
anything as hex dump
anything as text dump
info for returns a variety of information about its parameter, and is at least partially useful for doing
object specifier dumps. dump simply changes the class of its parameter to DUMP and returns it, which
in most cases means that AppleScript will display the data as a hex dump. text dump and hex dump are
special classes that most types can be coerced to, and return strings.